package com.cnswhy.cloud.server.core.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.cnswhy.cloud.common.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.cnswhy.cloud.common.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 
 * </p>
 *
 * @author cnswhy
 * @since 2021-03-13
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_iot_charging_line_index_info")
@ApiModel(value = "IotChargingLineIndexInfo", description = "")
@AllArgsConstructor
public class IotChargingLineIndexInfo extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 终端编号
     */
    @ApiModelProperty(value = "终端编号")
    @Length(max = 512, message = "终端编号长度不能超过512")
    @TableField(value = "terminal_id", condition = LIKE)
    @Excel(name = "终端编号")
    private String terminalId;

    /**
     * 组A序列号
     */
    @ApiModelProperty(value = "组A序列号")
    @Length(max = 255, message = "组A序列号长度不能超过255")
    @TableField(value = "a_index", condition = LIKE)
    @Excel(name = "组A序列号")
    private String aIndex;

    /**
     * 组B序列号
     */
    @ApiModelProperty(value = "组B序列号")
    @Length(max = 255, message = "组B序列号长度不能超过255")
    @TableField(value = "b_index", condition = LIKE)
    @Excel(name = "组B序列号")
    private String bIndex;

    /**
     * 组C序列号
     */
    @ApiModelProperty(value = "组C序列号")
    @Length(max = 255, message = "组C序列号长度不能超过255")
    @TableField(value = "c_index", condition = LIKE)
    @Excel(name = "组C序列号")
    private String cIndex;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间")
    @TableField("index_id")
    @Excel(name = "结束时间")
    private Integer indexId;

    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "reset_code", condition = LIKE)
    @Excel(name = "")
    private String resetCode;


    @Builder
    public IotChargingLineIndexInfo(Long id, LocalDateTime createTime, LocalDateTime updateTime, Long updateUser, Long createUser, 
                    String terminalId, String aIndex, String bIndex, String cIndex, Integer indexId, String resetCode) {
        this.id = id;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.updateUser = updateUser;
        this.createUser = createUser;
        this.terminalId = terminalId;
        this.aIndex = aIndex;
        this.bIndex = bIndex;
        this.cIndex = cIndex;
        this.indexId = indexId;
        this.resetCode = resetCode;
    }

}
